// 呼叫中心工单
const callCenterConfig = (request) => {
	return {
		// 列表
		view_callRecords_page(query = {}) {
			return request('/management/callRecords/page', {
				method: 'post',
				data: query,
			})
		},

		// 详情
		view_callRecords_id(id) {
			return request(`/management/callRecords/${id}`, {
				method: 'get',
			})
		},
		// 导入
		view_callRecord_import(query = {}, onUploadProgress) {
			return request('/bussiness/callRecords/import', {
				method: 'post',
				headers: {
					'Content-Type': 'multipart/form-data; boundary=something',
				},
				onUploadProgress,
				data: query,
			})
		},
		// 导入模板下载
		view_callRecord_downloadTemplate(query = {}) {
			return request('/bussiness/callRecords/downloadTemplate', {
				method: 'post',
				responseType: 'blob',
				data: query,
			})
		},
	}
}
// 人脸助餐工单
const facialRecognitionConfig = (request) => {
	return {
		// 列表
		view_orderRecords_page(query = {}) {
			return request('/management/orderRecords/page', {
				method: 'post',
				data: query,
			})
		},
		// 详情
		view_orderRecords_id(id) {
			return request(`/management/orderRecords/${id}`, {
				method: 'get',
			})
		},
	}
}
// 居家工单
const homeDoorstepConfig = (request) => {
	return {
		// 列表
		view_tblReposOrder_page(query = {}) {
			return request('/management/tblReposOrder/page', {
				method: 'post',
				data: query,
			})
		},
		// 详情
		view_tblReposOrder_id(id) {
			return request(`/management/tblReposOrder/${id}`, {
				method: 'get',
			})
		},
	}
}
// 政府购买工单
const govPurchaseConfig = (request) => {
	return {
		// 列表
		view_tblOrder_page(query = {}) {
			return request('/management/tblOrder/page', {
				method: 'post',
				data: query,
			})
		},
		// 详情
		view_tblOrder_id(id) {
			return request(`/management/tblOrder/${id}`, {
				method: 'get',
			})
		},
	}
}
// 户籍老年人管理
const domicileElderlyManage = (request) => {
	return {
		// 列表
		view_registeredElderlyPopulation_list(query = {}) {
			return request('/management/registeredElderlyPopulation/list', {
				method: 'post',
				data: query,
			})
		},
		// 编辑
		view_registeredElderlyPopulation_edit(query = {}) {
			return request('/management/registeredElderlyPopulation/edit', {
				method: 'post',
				data: query,
			})
		},
		// 新增
		view_registeredElderlyPopulation_add(query = {}) {
			return request('/management/registeredElderlyPopulation/add', {
				method: 'post',
				data: query,
			})
		},
	}
}
// 数据统计
const dataSummery = (request) => {
	return {
		// 政府购买
		view_statistics_tblorder(query = {}) {
			return request('/management/statistics/tblOrder/statistics', {
				method: 'post',
				data: query,
			})
		},
		// 居家上门
		view_statistics_tblReposOrder(query = {}) {
			return request('/management/statistics/tblReposOrder/statistics', {
				method: 'post',
				data: query,
			})
		},
		//服务覆盖面统计
		view_statistics_serviceCoverage(query = {}) {
			return request('/management/statistics/serviceCoverage/statistics', {
				method: 'post',
				data: query,
			})
		},
		//组织服务情况统计
		view_statistics_organizationService(query = {}) {
			return request('/management/statistics/organizationService/statistics', {
				method: 'post',
				data: query,
			})
		},
	}
}
export default ({ request }: any) => ({
	...callCenterConfig(request),
	...facialRecognitionConfig(request),
	...homeDoorstepConfig(request),
	...govPurchaseConfig(request),
	...domicileElderlyManage(request),
	...dataSummery(request),
})
